
import Vue from 'vue'
import App from './App'
import router from './router'
//引入状态管理store
import store from './store/index'
//引入全局初始化样式
import '../static/css/reset.css'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import VueLazyload from 'vue-lazyload'
Vue.use(VueLazyload, {
  loading: require('./assets/loading.gif'),//加载中图片，一定要有，不然会一直重复加载占位图
  error: require('./assets/error.jpg')  //加载失败图片
});
Vue.use(ElementUI)
// 跳转后返回顶部
router.afterEach((to,from,next) => {
  window.scrollTo(0,0);
})


new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>',
  store
})
